package robinson.util;

public class HeapArrayUtil {
	//zero based index
	public static int getParentIndex(int currentIndex){
		return (currentIndex+1)/2-1;
	}
	public static int getLeftChildIndex(int currentIndex){
		return 2*currentIndex+1;
	}
	public static int getRightChildIndex(int currentIndex){
		return 2*currentIndex+2;
	}
}
